import ImageViewer from '@/views/ImageViewer/ImageViewer.vue'
import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router'
import ExtraImageViewer from '@/views/ExtraImageViewer/ExtraImageViewer.vue'
import Test from '@/views/testPage/Test.vue'
import Home from '@/views/Home.vue'
import SingleStackViewerFromLocal from '@/views/ExtraImageViewer/components/stackView/SingleStackViewerFromLocal.vue'
import MprViewFromLocal from '@/views/ExtraImageViewer/components/mprView/MprViewFromLocal.vue'
import SurfaceView from '@/views/ExtraImageViewer/components/surfaceView/SurfaceView.vue'
import VolumeView from '@/views/ExtraImageViewer/components/volumeView/VolumeView.vue'
import fourDViewMultiSeries from '@/views/ExtraImageViewer/components/fourDView/FourDViewMultiSeries.vue'
import Test1 from '@/views/testPage/Test1.vue'
import MprViewFromNetwork from '@/views/ImageViewer/components/mprView/MprViewFromNetwork.vue'
import SurfaceViewWithContour from '@/views/ExtraImageViewer/components/surfaceView/SurfaceViewWithContour.vue'
import LoadSegmentFromNetSurface from '@/views/ImageViewer/components/segmentView/LoadSegmentFromNetSurface.vue'
import MprViewNifti from '@/views/ImageViewer/components/mprView/MprViewNifti.vue'
import FourDView from '@/views/ExtraImageViewer/components/fourDView/FourDView.vue'
import LoadSegmentVolumeLocalSurface
  from '@/views/ExtraImageViewer/components/segmentView/LoadSegmentVolumeLocalSurface.vue'
import LoadLocalMPRAndlocalContour
  from '@/views/ExtraImageViewer/components/segmentView/LoadLocalMPRAndlocalContour.vue'
import SingleStackViewerFromNetwork from '@/views/ImageViewer/components/stackView/SingleStackViewerFromNetwork.vue'

const routesConstants = [
  {
    path: '/loadStackLocal',
    component: SingleStackViewerFromLocal,
    name: 'StackViewerFromLocal',
    desc: '加载本地dicom，生成stackView,并包含了基础的图像操作'
  },
  {
    path: '/loadStackNetwork',
    component: SingleStackViewerFromNetwork,
    name: 'StackViewerFromNetwork',
    desc: '加载远程的dicom,显示stackView'
  },
  {
    path: '/loadMprLocal',
    component: MprViewFromLocal,
    name: 'MprViewFromLocal',
    desc: '加载本地dicom，生成mprView,并包含了基础的图像操作'
  },
  {
    path: '/loadMprRemote',
    component: MprViewFromNetwork,
    name: 'MprViewFromNetwork',
    desc: '从pacs上加载dicom，生成mprView,并包含了基础的图像操作'
  },

  { path: '/surface', component: SurfaceView, name: 'SurfaceView', desc: '面绘制' },
  {
    path: '/surfaceWithContour',
    component: SurfaceViewWithContour,
    name: 'SurfaceViewWithContour',
    desc: '面绘制+轮廓'
  },
  {
    path: '/loadLocalMprAndLocalContour',
    component: LoadLocalMPRAndlocalContour,
    name: 'LoadLocalMprAndLocalContour',
    desc: '加载本地MPR及本地contour'
  },
  { path: '/volume', component: VolumeView, name: 'VolumeView', desc: '体绘制' },


  {
    path: '/nifti',
    component: MprViewNifti,
    name: 'MprViewNifti',
    desc: '加载nifti格式'
  },
  {
    path: '/pet4d',
    component: FourDView,
    name: 'FourDView',
    desc: 'PET4D,只有一个series'
  },
  { path: '/test', component: Test, name: 'test', desc: '测官方出现的seg加载的bug' },
  { path: '/test1', component: Test1, name: 'test1', desc: '测官方出现的seg加载的bug' },
  {
    path: '/segment',
    component: LoadSegmentFromNetSurface,
    name: 'LoadSegmentFromNetSurface',
    desc: 'segmentation + mpr + 面绘制',
    disabled: true
  },
  { path: '/4d', component: fourDViewMultiSeries, name: '4dViewMultiSeries', desc: 'CT4D,多个序列', disabled: true },
  { path: '/', component: Home, name: 'home', desc: '首页', disabled: true }
]

const router = createRouter({
  // 4. 内部提供了 history 模式的实现。为了简单起见，我们在这里使用 hash 模式。
  history: createWebHashHistory(),
  routes: routesConstants // `routes: routes` 的缩写
})

export {
  router,
  routesConstants
}
